﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

	/// <summary>
	/// 实体类TB_Dic_ExamType 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public class TB_Dic_ExamType : Entity 
	{
		public TB_Dic_ExamType():base("TB_Dic_ExamType") {    _DicNO=Guid.NewGuid().ToString();}

        #region Model
        private string _DicNO;
        private string _DicName;
        private string _IsActive;
        private int? _TeacherCount;
        private string _ExamContent;
        private string _ExamYear;
        /// <summary>
        /// 字典编码
        /// </summary>
        public string DicNO
        {
            get { return _DicNO; }
            set
            {
                this.OnPropertyValueChange(_.DicNO, _DicNO, value);
                this._DicNO = value;
            }
        }
        /// <summary>
        /// 字典名称
        /// </summary>
        public string DicName
        {
            get { return _DicName; }
            set
            {
                this.OnPropertyValueChange(_.DicName, _DicName, value);
                this._DicName = value;
            }
        }
        /// <summary>
        /// 是否有效（1：开启   0：关闭）
        /// </summary>
        public string IsActive
        {
            get { return _IsActive; }
            set
            {
                this.OnPropertyValueChange(_.IsActive, _IsActive, value);
                this._IsActive = value;
            }
        }
        /// <summary>
        /// 考官人数
        /// </summary>
        public int? TeacherCount
        {
            get { return _TeacherCount; }
            set
            {
                this.OnPropertyValueChange(_.TeacherCount, _TeacherCount, value);
                this._TeacherCount = value;
            }
        }
        /// <summary>
        /// 考试内容
        /// </summary>
        public string ExamContent
        {
            get { return _ExamContent; }
            set
            {
                this.OnPropertyValueChange(_.ExamContent, _ExamContent, value);
                this._ExamContent = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ExamYear
        {
            get { return _ExamYear; }
            set
            {
                this.OnPropertyValueChange(_.ExamYear, _ExamYear, value);
                this._ExamYear = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
                _.DicNO};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
                _.DicNO,
                _.DicName,
                _.IsActive,
                _.TeacherCount,
                _.ExamContent,
                _.ExamYear};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
                this._DicNO,
                this._DicName,
                this._IsActive,
                this._TeacherCount,
                this._ExamContent,
                this._ExamYear};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._DicNO = DataUtils.ConvertValue<string>(reader["DicNO"]);
            this._DicName = DataUtils.ConvertValue<string>(reader["DicName"]);
            this._IsActive = DataUtils.ConvertValue<string>(reader["IsActive"]);
            this._TeacherCount = DataUtils.ConvertValue<int?>(reader["TeacherCount"]);
            this._ExamContent = DataUtils.ConvertValue<string>(reader["ExamContent"]);
            this._ExamYear = DataUtils.ConvertValue<string>(reader["ExamYear"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._DicNO = DataUtils.ConvertValue<string>(row["DicNO"]);
            this._DicName = DataUtils.ConvertValue<string>(row["DicName"]);
            this._IsActive = DataUtils.ConvertValue<string>(row["IsActive"]);
            this._TeacherCount = DataUtils.ConvertValue<int?>(row["TeacherCount"]);
            this._ExamContent = DataUtils.ConvertValue<string>(row["ExamContent"]);
            this._ExamYear = DataUtils.ConvertValue<string>(row["ExamYear"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Dic_ExamType");
            /// <summary>
            /// 字典编码
            /// </summary>
            public readonly static Field DicNO = new Field("DicNO", "TB_Dic_ExamType", "字典编码");
            /// <summary>
            /// 字典名称
            /// </summary>
            public readonly static Field DicName = new Field("DicName", "TB_Dic_ExamType", "字典名称");
            /// <summary>
            /// 是否有效（1：开启   0：关闭）
            /// </summary>
            public readonly static Field IsActive = new Field("IsActive", "TB_Dic_ExamType", "是否有效（1：开启   0：关闭）");
            /// <summary>
            /// 考官人数
            /// </summary>
            public readonly static Field TeacherCount = new Field("TeacherCount", "TB_Dic_ExamType", "考官人数");
            /// <summary>
            /// 考试内容
            /// </summary>
            public readonly static Field ExamContent = new Field("ExamContent", "TB_Dic_ExamType", "考试内容");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field ExamYear = new Field("ExamYear", "TB_Dic_ExamType", "ExamYear");
        }
        #endregion


    }
}

